package tree.clue;

/**
 * @ author : HyoJoo-W
 * @ createDate : 2021-06-05 13:28
 * @ Description :
 */
public class ThreadTest
{
    public static void main(String[] args)
    {
        ThreadTreeNode root = new ThreadTreeNode(1, "tom1");
        ThreadTreeNode node2 = new ThreadTreeNode(3, "tom2");
        ThreadTreeNode node3 = new ThreadTreeNode(6, "tom3");
        ThreadTreeNode node4 = new ThreadTreeNode(8, "tom4");
        ThreadTreeNode node5 = new ThreadTreeNode(10, "tom5");
        ThreadTreeNode node6 = new ThreadTreeNode(14, "tom6");

        root.setLeft(node2);
        root.setRight(node3);

        node2.setLeft(node4);
        node2.setRight(node5);

        node3.setLeft(node6);

        ThreadTree threadTree = new ThreadTree();
        threadTree.setRoot(root);
        threadTree.threadedNodes();

        //test
        ThreadTreeNode left = node5.getLeft();
        System.out.println("left = " + left);
        System.out.println(node5.getRight() );

        System.out.println(node5.getLeftType());
        System.out.println(root.getLeftType());
    }

}
